<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <button id="btn">点我</button>
    <script>
        /* 
        setInterval(func,time)
        间隔一段的时间执行函数
        */
       var btn =document.getElementById("btn");
       btn.onclick =function(){
           setInterval(go,1000)
       }
       function go(){
           alert("请下载")
       }
    </script>
</body>
</html>